package com.huabo.audit.oracle.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.huabo.audit.config.IgnoreSwaggerParameter;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 
 * </p>
 *
 * @author huabo
 * @since 2022-05-23
 */
@Data
@TableName("TBL_NBSJ_AUDITPLAN")
@ApiModel(value="审计计划对象", description="")
public class TblNbsjAuditplan implements Serializable {

	public final static Integer NO_SHS=0;//未实施
	public final static Integer YE_SHS=1;//已实施
	////审批状态
	/**
	 * 0未审批 
	 */
	public final static Integer SPNO=0;
	/**
	 * 1 审批中
	 */
	public final static Integer SPKA=1;
	/**
	 * 2 需调整  
	 */
	public final static Integer SPTZ=2;
	/**
	 * 3审批完
	 */
	public final static Integer SPWC=3;
	public final static Integer SPZZ=4;
	public final static Integer YSCXM=5;//已生成项目
	
    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty(value = "计划主键ID")
    @TableId("PLANID")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
    @Column(name = "PLANID")
    private BigDecimal planid;

    @ApiModelProperty(value = "计划编码")
    @TableField("PLANCODE")
    @Column(name = "PLANCODE")
    private String plancode;

    @ApiModelProperty(value = "计划名称")
    @Column(name = "PLANNAME")
    @TableField("PLANNAME")
    private String planname;

    @ApiModelProperty(value = "计划年度")
    @Column(name = "PALNYEAR")
    @TableField("PALNYEAR")
    private String palnyear;

    @ApiModelProperty(value = "计划类型")
    @Column(name = "PLANTYPE")
    @TableField("PLANTYPE")
    private String plantype;

    @ApiModelProperty(value = "计划对象 组织表外键")
    @Column(name = "AUDITORGID")
    @TableField("AUDITORGID")
    private BigDecimal auditorgid;

    @ApiModelProperty(value = "计划估算费用")
    @Column(name = "PALNCOST")
    @TableField("PALNCOST")
    private BigDecimal palncost;

    @ApiModelProperty(value = "开始时间",hidden=true)
    @Column(name = "STARTTIME")
    @TableField("STARTTIME")
    private Date starttime;

    @ApiModelProperty(value = "结束时间",hidden=true)
    @Column(name = "ENDTIME")
    @TableField("ENDTIME")
    private Date endtime;

    @ApiModelProperty(value = "计划负责人 用户表外键")
    @Column(name = "PRINCIPALID")
    @TableField("PRINCIPALID")
    private BigDecimal principalid;

    @ApiModelProperty(value = "审计组长 用户表外键")
    @Column(name = "LEADERID")
    @TableField("LEADERID")
    private BigDecimal leaderid;

    @ApiModelProperty(value = "审计目标和范围")
    @Column(name = "REMARKS")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "创建人 用户表外键")
    @Column(name = "CREATESTAFFID")
    @TableField("CREATESTAFFID")
    private BigDecimal createstaffid;

    @ApiModelProperty(value = "创建时间",hidden=true)
    @Column(name = "CREATETIME")
    @TableField("CREATETIME")
    private Date createtime;

    @ApiModelProperty(value = "修改时间",hidden=true)
    @Column(name = "UPDATETIMR")
    @TableField("UPDATETIMR")
    private Date updatetimr;

    @ApiModelProperty(value = "项目状态")
    @Column(name = "STATUS")
    @TableField("STATUS")
    private Integer status;

    @ApiModelProperty(value = "审批状态")
    @Column(name = "OPINIONSTATUS")
    @TableField("OPINIONSTATUS")
    private Integer opinionstatus;

    @ApiModelProperty(value = "是否外审  1是  0否")
    @Column(name = "ISAUDITOR")
    @TableField("ISAUDITOR")
    private Integer isauditor;

    @ApiModelProperty(value = "审计组长实体")
    @Transient
    @IgnoreSwaggerParameter
    private TblStaff leaderStaff;
    
    @ApiModelProperty(value = "计划负责人实体")
    @Transient
    @IgnoreSwaggerParameter
    private TblStaff principalStaff;
    
   
    @ApiModelProperty(value = "审计对象实体")
    @Transient
    @IgnoreSwaggerParameter
    private TblOrganization auditOrgInfo;
    
    @ApiModelProperty(value = "审计组长实体")
    @Transient
    @IgnoreSwaggerParameter
    private TblStaff createStaff;
    
    @ApiModelProperty(value = "审计计划项目集合")
    @Transient
    @IgnoreSwaggerParameter
    private List<TblNbsjPlanProject> planProjectList;
    
    @ApiModelProperty(value = "审计项目集合")
    @Transient
    @IgnoreSwaggerParameter
    private List<TblNbsjProject>  projectList;
    
    @ApiModelProperty(value = "总实施项目", hidden = true)
    @Transient
    private Integer totalItem;
    
    @ApiModelProperty(value = "未实施项目", hidden = true)
    @Transient
    @IgnoreSwaggerParameter
    private Integer unenforcedItem;
    
    @ApiModelProperty(value = "进行中项目", hidden = true)
    @Transient
    private Integer condectItem;
    
    @ApiModelProperty(value = "已完成项目", hidden = true)
    @Transient
    private Integer completeItem;
}
